/*
*利用12.6.1的习题中编写的类Foo和Bar,初始化Bar的static成员。将int成员初始化为20，并将Foo成员初始化为0
*/
#ifndef _DEFINE_
#define _DEFINE_

class Foo
{
public:
	Foo(int iVal)
	{
		count = iVal;
	}
	int getCount(){return count;}
private:
	int count;
}；

class Bar
{
public:
	//FooVal，返回Bar类的Foo类型static成员的值
	FOO FooVal()
	{
		callsFooVal++;
		return fo;
	}
private:
	static int i;
	static Foo fo;
	//callsFooVal,保存FooVal被调用的次数
	static int callsFooVal;
};

//初始化static成员
int Bar::i = 20;
int Bar::fo = 0;
int Bar::callsFooVal = 20;
#endif